/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entity;

import java.io.Serializable;
import java.math.BigInteger;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author WinKiQue58
 */
@Embeddable
public class ServicePreferencePK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_SERVICE_PREFERENCE")
    private BigInteger idServicePreference;
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_RECORD")
    private BigInteger idRecord;
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_PERSONAL_INFO")
    private BigInteger idPersonalInfo;
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_BRANCHENTERPRISE")
    private BigInteger idBranchenterprise;
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID_ENTERPRISE")
    private BigInteger idEnterprise;

    public ServicePreferencePK() {
    }

    public ServicePreferencePK(BigInteger idServicePreference, BigInteger idRecord, BigInteger idPersonalInfo, BigInteger idBranchenterprise, BigInteger idEnterprise) {
        this.idServicePreference = idServicePreference;
        this.idRecord = idRecord;
        this.idPersonalInfo = idPersonalInfo;
        this.idBranchenterprise = idBranchenterprise;
        this.idEnterprise = idEnterprise;
    }

    public BigInteger getIdServicePreference() {
        return idServicePreference;
    }

    public void setIdServicePreference(BigInteger idServicePreference) {
        this.idServicePreference = idServicePreference;
    }

    public BigInteger getIdRecord() {
        return idRecord;
    }

    public void setIdRecord(BigInteger idRecord) {
        this.idRecord = idRecord;
    }

    public BigInteger getIdPersonalInfo() {
        return idPersonalInfo;
    }

    public void setIdPersonalInfo(BigInteger idPersonalInfo) {
        this.idPersonalInfo = idPersonalInfo;
    }

    public BigInteger getIdBranchenterprise() {
        return idBranchenterprise;
    }

    public void setIdBranchenterprise(BigInteger idBranchenterprise) {
        this.idBranchenterprise = idBranchenterprise;
    }

    public BigInteger getIdEnterprise() {
        return idEnterprise;
    }

    public void setIdEnterprise(BigInteger idEnterprise) {
        this.idEnterprise = idEnterprise;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idServicePreference != null ? idServicePreference.hashCode() : 0);
        hash += (idRecord != null ? idRecord.hashCode() : 0);
        hash += (idPersonalInfo != null ? idPersonalInfo.hashCode() : 0);
        hash += (idBranchenterprise != null ? idBranchenterprise.hashCode() : 0);
        hash += (idEnterprise != null ? idEnterprise.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ServicePreferencePK)) {
            return false;
        }
        ServicePreferencePK other = (ServicePreferencePK) object;
        if ((this.idServicePreference == null && other.idServicePreference != null) || (this.idServicePreference != null && !this.idServicePreference.equals(other.idServicePreference))) {
            return false;
        }
        if ((this.idRecord == null && other.idRecord != null) || (this.idRecord != null && !this.idRecord.equals(other.idRecord))) {
            return false;
        }
        if ((this.idPersonalInfo == null && other.idPersonalInfo != null) || (this.idPersonalInfo != null && !this.idPersonalInfo.equals(other.idPersonalInfo))) {
            return false;
        }
        if ((this.idBranchenterprise == null && other.idBranchenterprise != null) || (this.idBranchenterprise != null && !this.idBranchenterprise.equals(other.idBranchenterprise))) {
            return false;
        }
        if ((this.idEnterprise == null && other.idEnterprise != null) || (this.idEnterprise != null && !this.idEnterprise.equals(other.idEnterprise))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entity.ServicePreferencePK[ idServicePreference=" + idServicePreference + ", idRecord=" + idRecord + ", idPersonalInfo=" + idPersonalInfo + ", idBranchenterprise=" + idBranchenterprise + ", idEnterprise=" + idEnterprise + " ]";
    }
    
}
